/** @file Controller.h
 *	@class Controller
 *  @brief The abstract base class for all controllers
 *
 *	This is the abstract base class from which the other controller classes, such as EventUpdater, Input, and Network inherit
 */

#include "stdafx.h"
#include "Model.h"

#ifndef __Controller_h_
#define __Controller_h_

class Controller {
public:
	/**
	*	@brief The constructor
	*/
	Controller();

	/**
	*	@brief The destructor
	*/
	~Controller();

	/**
	*	@brief Sets the model which the controller works with
	*/
	void setModel(Model* model);

	/**
	*	@brief The ever-important update method, which updates the game logic for the models attached to the subclass controllers
	*/
	virtual bool update(float deltaTime) = 0;
	
	/**
	* @brief Returns if the controller is active or not
	*/
	bool isActive();
	
	/**
	* @brief Sets if the controller is active
	*/
	virtual void setActive(bool in);

protected:
	/**
	* @brief The current model for the controller
	*/
	Model* m_currentModel;
	
	/**
	* @brief If the contorller is active
	*/
	bool m_active;
};

#endif
